import request from "@/utils/request";

export default {
  //我的关注
  myConcern() {
    return request({
      url: `/concern		`,
      method: "get"
    });
  },
  //我的粉丝
  myFans() {
    return request({
      url: `/fans`,
      method: "get"
    });
  },
  //添加关注,参数user为被关注者信息
  add(user) {
    return request({
      url: "/concern",
      method: "post",
      data: user
    });
  },

  // getById(id) {
  //     return request({
  //         url: `/comment/${id}`,
  //         method: 'get'
  //     })
  // },

  //判断是否关注了该用户，id为用户的主键
  isExist(id) {
    return request({
      url: `/concern/${id}`,
      method: `get`
    });
  },

  //取消关注
  deleteById(id) {
    return request({
      url: `/comment/${id}`,
      method: "delete"
    });
  }
};
